;; Exercise 1.2.  Translate the following expression into prefix form
;;
;; 5+4+(2-(3-(6+4/5)))
;; -------------------
;; 3(6-2)(2-7)

(use test)

(define dividendo (+ (+ 5 4) (- 2 (- 3 (+ 6 (/ 4 5))))))
(define divisor (* 3 (- 6 2) (- 2 7)))

(test-group "expressao em partes"
            (test 14.8 dividendo)
            (test -60 divisor)
)

(test-group "expressao completa"
            (define expressao_prefixa (/ dividendo divisor))
            (test-assert (= (/ 14.8 -60) expressao_prefixa))
)
